<!DOCTYPE html>
<html>
<head>
    <title>添加司机</title>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <link rel="stylesheet" href="../../css/bootstrap.min.css">
    <link rel="stylesheet" href="../../css/font-awesome.min.css">
    <link rel="stylesheet" href="../../plugins/jqgrid/ui.jqgrid-bootstrap.css">
    <link rel="stylesheet" href="../../plugins/ztree/css/metroStyle/metroStyle.css">
    <link rel="stylesheet" href="../../css/main.css">
    <link rel="stylesheet" href="https://unpkg.com/element-ui@1.4.1/lib/theme-default/index.css">
    <script src="../../libs/jquery.min.js"></script>
    <script src="../../plugins/layer/layer.js"></script>
    <script src="../../libs/bootstrap.min.js"></script>
    <script src="../../libs/vue.min.js"></script>
    <script src="../../libs/utilsjs.js"></script>
    <script src="../../plugins/jqgrid/grid.locale-cn.js"></script>
    <script src="../../plugins/jqgrid/jquery.jqGrid.min.js"></script>
    <script src="../../plugins/ztree/jquery.ztree.all.min.js"></script>
    <script src="../../js/common.js"></script>
    <script src="https://unpkg.com/element-ui@1.4.1/lib/index.js "></script>

    <style>
        .avatar-uploader .el-upload {
            border: 1px dashed #d9d9d9;
            border-radius: 6px;
            cursor: pointer;
            position: relative;
            overflow: hidden;
        }

        .avatar-uploader .el-upload:hover {
            border-color: #20a0ff;
        }

        .avatar-uploader-icon {
            font-size: 28px;
            color: #8c939d;
            width: 178px;
            height: 178px;
            line-height: 178px;
            text-align: center;
        }

        .center {
            text-align: center;
        }

        .avatar {
            width: 178px;
            height: 178px;
            display: block;
        }

        .border-line {
            padding-top: 15px;
            border-top: 1px solid #d6dcde;
            font-size: 16px;
        }

        .el-upload__input {
            display: none !important;
        }

        .small-btn {
            padding-left: 20px;
            padding-right: 20px;
            padding-top: 3px;
            padding-bottom: 3px;
        }
    </style>

</head>
<body>
<div id="rrapp" v-cloak>
    <div v-show="showList">
        <div class="grid-btn">
            <div class="form-group col-sm-4">
                <input type="text" class="form-control" v-model="q.branchCompany" placeholder="所属分公司"/>
            </div>
            <div class="form-group col-sm-4">
                <input type="text" class="form-control" v-model="q.netPoint" placeholder="所属网点"/>
            </div>
            <div class="form-group col-sm-4">
                <input type="text" class="form-control" v-model="q.name" placeholder="司机姓名"/>
            </div>
            <div class="form-group col-sm-4">
                <input type="text" class="form-control" v-model="q.mobile" placeholder="司机手机号"/>
            </div>
            &nbsp;&nbsp;
            <a class="btn btn-primary" @click="query">查询</a>
            <a class="btn btn-primary" @click="empty">清空筛选</a>
            <a v-if="hasPermission('sjdriverapply:save')" class="btn btn-primary" @click="add" style="margin-left:60px;"><i class="fa fa-plus"></i>&nbsp;新增</a>
            <a v-if="hasPermission('sjdriverapply:update')" class="btn btn-primary" @click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;修改</a>
            <a v-if="hasPermission('sjdriverapply:delete')" class="btn btn-primary" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
        </div>
        <table id="jqGrid"></table>
        <div id="jqGridPager"></div>
    </div>

    <div v-show="!showList" class="panel panel-default">
        <div class="panel-heading">{{title}}</div>
        <form class="form-horizontal" style="width:1600px;">
            <div id="noCheck">
                <div class="form-group">
                    <div class="col-sm-2 control-label"><span style="color:red">*</span>司机姓名</div>
                    <div class="col-sm-3">
                        <input type="text" id="name" class="form-control" v-model="sjDriverApply.name" placeholder="司机姓名(必填)"/>
                    </div>
                    <div class="col-sm-2 control-label"><span style="color:red">*</span>性别</div>
                    <div class="col-sm-3">
                        <label class="radio-inline"><input type="radio" v-model="sjDriverApply.sex" name="sex" value="1"/>男</label>
                        <label class="radio-inline"><input type="radio" v-model="sjDriverApply.sex" name="sex" value="0"/>女</label>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">年龄</div>
                    <div class="col-sm-3">
                        <input type="number" class="form-control" v-model="sjDriverApply.age" placeholder="年龄"/>
                    </div>
                    <div class="col-sm-2 control-label">身份证号</div>
                    <div class="col-sm-3">
                        <input type="number" id="idCard" class="form-control" v-model="sjDriverApply.idCard" placeholder="身份证号(必填)"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">手机号</div>
                    <div class="col-sm-3">
                        <input type="number"  id="mobile" class="form-control" v-model="sjDriverApply.mobile" placeholder="手机号(必填)"/>
                    </div>
                    <div class="col-sm-2 control-label">银行卡号</div>
                    <div class="col-sm-3">
                        <input type="number" id="bankCarNo" class="form-control" v-model="sjDriverApply.bankCardNo" placeholder="银行卡号(必填)"/>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">分公司</div>
                    <div class="col-sm-3">
                        <input type="text" class="form-control" v-model="sjDriverApply.branchCompany" readonly="readonly"
                               @click="popBranchCompanySelect"
                               placeholder="请选择分公司"/>
                    </div>
                    <div class="col-sm-2 control-label">网点</div>
                    <div class="col-sm-3">
                        <input type="text" class="form-control" v-model="sjDriverApply.netPoint" readonly="readonly"
                               @click="popNetPointSelect"
                               placeholder="请选择网点"/>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-2 control-label">车型</div>
                    <div class="col-sm-3">
                        <input type="text" id="carstyle" class="form-control" v-model="sjDriverApply.carstyle" placeholder="车型(必填)"/>
                    </div>
                    <div class="col-sm-2 control-label">车牌</div>
                    <div class="col-sm-3">
                        <input type="text" id="carno" class="form-control" v-model="sjDriverApply.carno" placeholder="车牌(必填)"/>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-2 control-label">加盟金额</div>
                    <div class="col-sm-3">
                        <input type="number" class="form-control" v-model="sjDriverApply.joinMoney" placeholder="加盟金额"/>
                    </div>
                    <div class="col-sm-2 control-label">已付金额</div>
                    <div class="col-sm-3">
                        <input type="number" class="form-control" v-model="sjDriverApply.paidMoney" placeholder="已付金额"/>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-2 control-label">未付金额</div>
                    <div class="col-sm-3">
                        <input type="number" class="form-control" v-model="sjDriverApply.unpaidMoney" placeholder="未付金额"/>
                    </div>
                    <div class="col-sm-2 control-label">保险到期时间</div>
                    <div class="col-sm-2">
                        <el-date-picker v-model="sjDriverApply.insuranceExpiryDate" type="date"
                                        placeholder="保险到期时间" style="width:370px;"></el-date-picker>
                    </div>
                </div>

                <div class="form-group">
                    <div class="col-sm-2 control-label">身份证照片</div>
                    <div id="appUpload" class="col-sm-3 center">
                        <el-upload id="preview" class="avatar-uploader" action="/qwj_shop/sjdriverapply/uploadCard"
                                   :show-file-list="false" :on-success="handleAvatarSuccess"
                                   :before-upload="beforeAvatarUpload">
                            <img v-if="imageUrl1" :src="imageUrl1" class="avatar">
                            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                        </el-upload>
                    </div>
                    <div class="col-sm-2 control-label">手持身份证照片</div>
                    <div id="appUpload2" class="col-sm-3 center">
                        <el-upload id="preview2" class="avatar-uploader" action="/qwj_shop/sjdriverapply/uploadCard"
                                   :show-file-list="false" :on-success="handleAvatarSuccess2"
                                   :before-upload="beforeAvatarUpload">
                            <img v-if="imageUrl2" :src="imageUrl2" class="avatar">
                            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                        </el-upload>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">驾驶证照片</div>
                    <div id="appUpload3" class="col-sm-3 center">
                        <el-upload id="preview3" class="avatar-uploader" action="/qwj_shop/sjdriverapply/uploadCard"
                                   :show-file-list="false" :on-success="handleAvatarSuccess3"
                                   :before-upload="beforeAvatarUpload">
                            <img v-if="imageUrl3" :src="imageUrl3" class="avatar">
                            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                        </el-upload>
                    </div>
                    <div class="col-sm-2 control-label">行驶证照片</div>
                    <div id="appUpload4" class="col-sm-3 center">
                        <el-upload id="preview4" class="avatar-uploader" action="/qwj_shop/sjdriverapply/uploadCard"
                                   :show-file-list="false" :on-success="handleAvatarSuccess4"
                                   :before-upload="beforeAvatarUpload">
                            <img v-if="imageUrl4" :src="imageUrl4" class="avatar">
                            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                        </el-upload>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">签约合同照片</div>
                    <div id="appUpload5" class="col-sm-3 center">
                        <el-upload id="preview5" class="avatar-uploader" action="/qwj_shop/sjdriverapply/uploadCard"
                                   :show-file-list="false" :on-success="handleAvatarSuccess5"
                                   :before-upload="beforeAvatarUpload">
                            <img v-if="imageUrl5" :src="imageUrl5" class="avatar">
                            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                        </el-upload>
                    </div>
                    <div class="col-sm-2 control-label">签约合同照片2</div>
                    <div id="appUpload6" class="col-sm-3 center">
                        <el-upload id="preview6" class="avatar-uploader" action="/qwj_shop/sjdriverapply/uploadCard"
                                   :show-file-list="false" :on-success="handleAvatarSuccess6"
                                   :before-upload="beforeAvatarUpload">
                            <img v-if="imageUrl6" :src="imageUrl6" class="avatar">
                            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                        </el-upload>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">签约合同照片3</div>
                    <div id="appUpload7" class="col-sm-3 center">
                        <el-upload id="preview7" class="avatar-uploader" action="/qwj_shop/sjdriverapply/uploadCard"
                                   :show-file-list="false" :on-success="handleAvatarSuccess7"
                                   :before-upload="beforeAvatarUpload">
                            <img v-if="imageUrl7" :src="imageUrl7" class="avatar">
                            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                        </el-upload>
                    </div>

                    <div class="col-sm-2 control-label">签约合同照片4</div>
                    <div id="appUpload8" class="col-sm-3 center">
                        <el-upload id="preview8" class="avatar-uploader" action="/qwj_shop/sjdriverapply/uploadCard"
                                   :show-file-list="false" :on-success="handleAvatarSuccess8"
                                   :before-upload="beforeAvatarUpload">
                            <img v-if="imageUrl8" :src="imageUrl8" class="avatar">
                            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                        </el-upload>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-2 control-label">车辆保险照片</div>
                    <div id="appUpload9" class="col-sm-3 center">
                        <el-upload id="preview9" class="avatar-uploader" action="/qwj_shop/sjdriverapply/uploadCard"
                                   :show-file-list="false" :on-success="handleAvatarSuccess9"
                                   :before-upload="beforeAvatarUpload">
                            <img v-if="imageUrl9" :src="imageUrl9" class="avatar">
                            <i v-else class="el-icon-plus avatar-uploader-icon"></i>
                        </el-upload>
                    </div>
                </div>
            </div>

            <div id="check">
                <div class="form-group" >
                    <div class="col-sm-2 control-label">审核人</div>
                    <div class="col-sm-4">
                        <input type="text" class="form-control" v-model="sjDriverApply.examinerId" placeholder="审核人"/>
                    </div>
                </div>

                <div class="form-group" >
                    <div class="col-sm-2 control-label">审核时间</div>
                    <div class="col-sm-4">
                        <el-date-picker v-model="sjDriverApply.examineTime" type="date" placeholder="审核时间" style="width:500px;"></el-date-picker>
                    </div>
                </div>

                <div class="form-group" >
                    <div class="col-sm-2 control-label">审核原因</div>
                    <div class="col-sm-4">
                        <textarea  rows="10" class="form-control" v-model="sjDriverApply.remark" placeholder="审核原因" ></textarea>
                    </div>
                </div>
            </div>

            <div class="form-group" >
                <div class="col-sm-6 control-label"></div>
                <input id="check2" type="button" class="btn btn-primary" @click="sjCheck" value="审核"/>
                <input id="noCheck2" type="button" class="btn btn-primary" @click="saveOrUpdate" value="确定"/>
                &nbsp;&nbsp;<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
            </div>
        </form>
    </div>
</div>


<!----------------------------分公司选择窗口------------------------------------->
<div id="windowBranchCompany" hidden="true">
    <div id="rrappBranchCompany">
        <div v-show="showList">
            <div class="grid-btn">
                <a class="btn btn-primary btn-sm" id="addBranchCompany">确定</a>
                <a class="btn btn-primary btn-sm" id="closeBranchCompany">关闭</a>
            </div>
            <table id="jqGridBranchCompany"></table>
            <div id="jqGridPagerBranchCompany"></div>
        </div>
    </div>
</div>

<!----------------------------网点选择窗口------------------------------------->
<div id="windowNetPoint" hidden="true">
    <div id="rrappNetPoint">
        <div v-show="showList">
            <div class="grid-btn">
                <a class="btn btn-primary btn-sm" id="addNetPoint">确定</a>
                <a class="btn btn-primary btn-sm" id="closeNetPoint">关闭</a>
            </div>
            <table id="jqGridNetPoint"></table>
            <div id="jqGridPagerNetPoint"></div>
        </div>
    </div>
</div>

<script src="../../js/modules/sjdriverapply/sjdriverapply.js"></script>
</body>
</html>